<template>
  <div>
    子组件
    <div>1:{{ $attrs.title }}</div>
    <div>2:{{ width }}</div>
  </div>
</template>

<script>
export default {
  props: {
    width: {
      type: String,
      default: ''
    }
  },
  data () {
    return {

    }
  },
  created () {

  },
  mounted () {
    console.log(this.$attrs) // {title: "这是标题", height: "80"},如果接收的时候在props中定义，就自动在$attrs剔除某个属性
    console.log(this.$listeners) // 父组件的clik需要加修饰符 .native
  },
  methods: {

  }
}
</script>

<style  lang="scss" scoped>

</style>
